import Home from './components/Home';
import Profile from './components/Profile';
import User from './components/User';
import UserAdd from './components/UserAdd';
import UserList from './components/UserList';
import UserDetail from './components/UserDetail';
import Protected from './components/Protected';
import Login from './components/Login';
import NotFound from './components/NotFound';
//路由的配置数组
const routesConfig = [
    {path:'/',element:<Home/>},
    {
        path:'/user',
        element:<User/>,
        children:[
            {path:'add',element:<UserAdd/>},
            {path:'list',element:<UserList/>},
            {path:'detail/:id',element:<UserDetail/>},
        ]
    },
    {path:'/profile',element:<Protected component={Profile} path="/profile"/>},
    {path:'/login',element:<Login/>},
    {path:'*',element:<NotFound/>},
//  {path:'/post',element:<Post/>}
]
export default routesConfig;